import Home     from '../views/home'
import Login    from '../views/login'
import Register from '../views/register'
import Main     from '../views/main'
import Qr       from '../views/qr'
import My       from '../views/my'
import Record   from '../views/main/record'
import Detail   from '../views/main/detail'
import isLogin  from '../until/loginType'
const routers = [
    {
        path:'/home',
        component:isLogin(Home),   
        children:[
            {
                path:'/home/main',
                component:isLogin(Main),   
            },

            {
                path:'/home/qr',
                component:isLogin(Qr),   
            },
            {
                path:'/home/my',
                component:isLogin(My),   
            },
            {
                from:'/home',
                to:'/home/main'
            }
        ]
    },
    {
        path:'/record',
        component:isLogin(Record)
    },
    {
        path:'/detail/:orderId/:price',
        component:isLogin(Detail)
    },
    {
        path:'/login',
        component:Login
    },
    {
        path:'/register',
        component:Register
    },
    {
        from:'/',
        to:'/login'
    }
]


export default routers